<!DOCTYPE html>



  


<html class="theme-next muse use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Hexo, NexT" />










<meta name="description" content="Category分类的对象方法在在父类的方法列表中,分类的类方法在元类中,运行时(runtime)将原有的方法合并到类中,如果有多个分类,在分类中有方法重复的话,调用后编译的分类中的方法">
<meta property="og:type" content="article">
<meta property="og:title" content="Category分类">
<meta property="og:url" content="http://yoursite.com/2018/06/15/Category分类/index.html">
<meta property="og:site_name" content="Erhqe">
<meta property="og:description" content="Category分类的对象方法在在父类的方法列表中,分类的类方法在元类中,运行时(runtime)将原有的方法合并到类中,如果有多个分类,在分类中有方法重复的话,调用后编译的分类中的方法">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="https://ws2.sinaimg.cn/large/006tNc79ly1fscx0i42g6j30hz04ldgt.jpg">
<meta property="og:updated_time" content="2019-07-19T05:40:06.073Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Category分类">
<meta name="twitter:description" content="Category分类的对象方法在在父类的方法列表中,分类的类方法在元类中,运行时(runtime)将原有的方法合并到类中,如果有多个分类,在分类中有方法重复的话,调用后编译的分类中的方法">
<meta name="twitter:image" content="https://ws2.sinaimg.cn/large/006tNc79ly1fscx0i42g6j30hz04ldgt.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2018/06/15/Category分类/"/>





  <title>Category分类 | Erhqe</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Erhqe</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            Categories
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2018/06/15/Category分类/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Erhqe">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/10.png">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Erhqe">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Category分类</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2018-06-15T18:35:34+08:00">
                2018-06-15
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/InterView/" itemprop="url" rel="index">
                    <span itemprop="name">InterView</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/2018/06/15/Category分类/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count valine-comment-count" data-xid="/2018/06/15/Category分类/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h4 id="Category"><a href="#Category" class="headerlink" title="Category"></a>Category</h4><p><strong>分类的对象方法在在父类的方法列表中,分类的类方法在元类中,运行时(runtime)将原有的方法合并到类中,如果有多个分类,在分类中有方法重复的话,调用后编译的分类中的方法</strong><a id="more"></a></p>
<hr>
<p><strong>ClassExtension在编译的时候,它的数据就已经包含在类信息中</strong></p>
<p><strong>Category四在运行时,才会将数据合并到类信息中</strong></p>
<hr>
<p><strong>Runtime加载分类到内存的时候调用+load方法,(不管用没用到都会调用一次),分类的+load方法不会覆盖类的+load方法,先调用类的+load方法,再调用分类的load方法(编译顺序)</strong></p>
<p><strong>+load方法之所以都会调用,是因为load方法是通过地址直接调用的</strong></p>
<p><strong>+initialize方法会在第一次接收到消息时调用,如果有继承关系,先调用父类的,在调用子类的,objc_msgSend进行调用,所以分类的+initialize会覆盖父类的+initialize</strong></p>
<h5 id="添加属性"><a href="#添加属性" class="headerlink" title="添加属性"></a>添加属性</h5><p><strong>平时写的@property(assign,nonatomic) int age; 会自动生成3样东西</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">.H</span><br><span class="line">@interface Person : NSObject</span><br><span class="line">&#123;</span><br><span class="line">    int _age;</span><br><span class="line">&#125;</span><br><span class="line">- (void)setAge:(int)age;</span><br><span class="line">- (int)age;</span><br><span class="line">@end</span><br><span class="line">.M</span><br><span class="line">- (void)setAge:(int)age&#123;</span><br><span class="line">    _age = age;</span><br><span class="line">&#125;</span><br><span class="line">- (int)age&#123;</span><br><span class="line">    return _age;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p><strong>而分类中添加@property(assign,nonatomic) int age;属性时只会做一件事情</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">// 只会生成方法的声明</span><br><span class="line">- (void)setAge:(int)age;</span><br><span class="line">- (int)age;</span><br><span class="line"></span><br><span class="line">//下面这句会报错,分类里面不能添加成员变量</span><br><span class="line">@interface Person (Test)</span><br><span class="line">&#123;</span><br><span class="line">    int _age;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>因此下一个方法是在.M中设置一个__ age变量,还是不行因为是全局变量,第二次赋值会覆盖第一次赋值,第二个方法是在.M中创建一个字典,self的内存地址为Key,age为值存储,存在为题线程抢夺资源,给每一个属性创建一个字典</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line">.H</span><br><span class="line">@interface Person (Test)</span><br><span class="line">@property(assign,nonatomic) int age;</span><br><span class="line">@end</span><br><span class="line"></span><br><span class="line">.M </span><br><span class="line">#import &quot;Person+Test.h&quot;</span><br><span class="line">@implementation Person (Test)</span><br><span class="line">NSMutableDictionary *ages_;</span><br><span class="line">+ (void)load&#123;</span><br><span class="line">    ages_ = [NSMutableDictionary dictionary];</span><br><span class="line">&#125;</span><br><span class="line">- (void)setAge:(int)age&#123;</span><br><span class="line">    NSString *key = [NSString stringWithFormat:@&quot;%p&quot;,self];</span><br><span class="line">    ages_[key] = @(age);</span><br><span class="line">&#125;</span><br><span class="line">- (int)age&#123;</span><br><span class="line">    NSString *key = [NSString stringWithFormat:@&quot;%p&quot;,self];</span><br><span class="line">    return [ages_[key] intValue];</span><br><span class="line">&#125;</span><br><span class="line">@end</span><br></pre></td></tr></table></figure>
<p><strong>利用runtime关联对象</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">#import &quot;Person+Test.h&quot;</span><br><span class="line">#import &lt;objc/runtime.h&gt;</span><br><span class="line">const void * BRAgeKey = &amp;BRAgeKey;  //  利用本身的地址为Key(写别的也行只是为了保证唯一)</span><br><span class="line">@implementation Person (Test)</span><br><span class="line"></span><br><span class="line">- (void)setAge:(int)age&#123;</span><br><span class="line">//    objc_AssociationPolicy</span><br><span class="line">    objc_setAssociatedObject(self, BRAgeKey , @(age),  OBJC_ASSOCIATION_RETAIN_NONATOMIC);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">- (int)age&#123;</span><br><span class="line">    return [objc_getAssociatedObject(self, BRAgeKey) intValue];</span><br><span class="line">&#125;</span><br><span class="line">@end</span><br></pre></td></tr></table></figure>
<p><strong>存储时候的最后一个参数</strong></p>
<p><img src="https://ws2.sinaimg.cn/large/006tNc79ly1fscx0i42g6j30hz04ldgt.jpg" alt=""></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">Person *person = [[Person alloc]init];</span><br><span class="line">person.age = 10;</span><br><span class="line">NSLog(@&quot;%d&quot;,person.age);</span><br><span class="line">//	打印结果10</span><br></pre></td></tr></table></figure>
<ol start="10">
<li>存在问题1const void * BRAgeKey = &BRAgeKey; 由于是全局变量外部可以利用extern 来访问用Static来处理(只对当前文件),内存地址占据8个字节,由于第二各参数key要的只是一个指针所以我们把代码简化成这样</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">#import &quot;Person+Test.h&quot;</span><br><span class="line">#import &lt;objc/runtime.h&gt;</span><br><span class="line">static const char BRAgeKey;   //  利用本身的地址为Key(写别的也行只是为了保证唯一)</span><br><span class="line">//	如果有别的属性再创建一个地址,保证是唯一的</span><br><span class="line">@implementation Person (Test)</span><br><span class="line"></span><br><span class="line">- (void)setAge:(int)age&#123;</span><br><span class="line">//    objc_AssociationPolicy</span><br><span class="line">    objc_setAssociatedObject(self, &amp;BRAgeKey , @(age),  OBJC_ASSOCIATION_RETAIN_NONATOMIC);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">- (int)age&#123;</span><br><span class="line">    return [objc_getAssociatedObject(self, &amp;BRAgeKey) intValue];</span><br><span class="line">&#125;</span><br><span class="line">@end</span><br></pre></td></tr></table></figure>
<ol start="11">
<li>简化方便易懂,下面我们把Key写成@”age”,因为这样写的字符串在常量区,所以跟下面的@”age”地址是一样的,</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">#import &quot;Person+Test.h&quot;</span><br><span class="line">#import &lt;objc/runtime.h&gt;</span><br><span class="line">//	为了保证两次写的都一样,可以在外面写成宏定义</span><br><span class="line">@implementation Person (Test)</span><br><span class="line"></span><br><span class="line">- (void)setAge:(int)age&#123;</span><br><span class="line">//    objc_AssociationPolicy</span><br><span class="line">    objc_setAssociatedObject(self, @&quot;age&quot; , @(age),  OBJC_ASSOCIATION_RETAIN_NONATOMIC);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">- (int)age&#123;</span><br><span class="line">    return [objc_getAssociatedObject(self, @&quot;age&quot;) intValue];</span><br><span class="line">&#125;</span><br><span class="line">@end</span><br></pre></td></tr></table></figure>
<ol start="12">
<li>最终方案使用get方法@selector(age)作为Key,这也会返回地址,而且有提示,set方法也行,不过set方法长了一点</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">#import &quot;Person+Test.h&quot;</span><br><span class="line">#import &lt;objc/runtime.h&gt;</span><br><span class="line"></span><br><span class="line">@implementation Person (Test)</span><br><span class="line"></span><br><span class="line">- (void)setAge:(int)age&#123;</span><br><span class="line">//    objc_AssociationPolicy</span><br><span class="line">    objc_setAssociatedObject(self, @selector(age) , @(age),  OBJC_ASSOCIATION_RETAIN_NONATOMIC);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">- (int)age&#123;</span><br><span class="line">    return [objc_getAssociatedObject(self, @selector(age)) intValue];</span><br><span class="line">&#125;</span><br><span class="line">@end</span><br></pre></td></tr></table></figure>
<ol start="13">
<li>也可以修改成这样</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">- (void)setAge:(int)age&#123;</span><br><span class="line">//    objc_AssociationPolicy</span><br><span class="line">    objc_setAssociatedObject(self, @selector(age) , @(age),  OBJC_ASSOCIATION_RETAIN_NONATOMIC);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">- (int)age&#123;</span><br><span class="line">//    _cmd 隐士参数</span><br><span class="line">//    @selector(age) == _cmd;</span><br><span class="line">    return [objc_getAssociatedObject(self, _cmd) intValue];</span><br><span class="line">&#125;</span><br><span class="line">//	实际上的GET方法隐士参数</span><br><span class="line">//- (int)age:(id)self _cmd:(SEL)_cmd&#123;</span><br><span class="line">//    //    @selector(age) == _cmd;</span><br><span class="line">//    return [objc_getAssociatedObject(self, _cmd) intValue];</span><br><span class="line">//&#125;</span><br></pre></td></tr></table></figure>
<ol start="14">
<li>这样存储属性,不会对Person产生变化,因为这样存储属性不在Person里面的</li>
</ol>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/06/15/KVC/" rel="next" title="KVC">
                <i class="fa fa-chevron-left"></i> KVC
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/06/16/Block/" rel="prev" title="Block">
                Block <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
    </div>
  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Overview
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/images/10.png"
                alt="Erhqe" />
            
              <p class="site-author-name" itemprop="name">Erhqe</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">70</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                
                  <span class="site-state-item-count">31</span>
                  <span class="site-state-item-name">categories</span>
                
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                
                  <span class="site-state-item-count">1</span>
                  <span class="site-state-item-name">tags</span>
                
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-4"><a class="nav-link" href="#Category"><span class="nav-number">1.</span> <span class="nav-text">Category</span></a><ol class="nav-child"><li class="nav-item nav-level-5"><a class="nav-link" href="#添加属性"><span class="nav-number">1.1.</span> <span class="nav-text">添加属性</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Erhqe</span>

  
</div>


  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Muse</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  










  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src="//unpkg.com/valine/dist/Valine.min.js"></script>
  
  <script type="text/javascript">
    var GUEST = ['nick','mail','link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item=>{
      return GUEST.indexOf(item)>-1;
    });
    new Valine({
        el: '#comments' ,
        verify: false,
        notify: false,
        appId: 'TiAY2J24ECwQH9uLYsoJpgIK-gzGzoHsz',
        appKey: 'Y9PiVrPXVmfNsv4Aa6cPsADG',
        placeholder: 'Just go go',
        avatar:'mm',
        guest_info:guest,
        pageSize:'10' || 10,
    });
  </script>



  





  

  

  

  
  

  

  

  

</body>
</html>
